﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Infinity.Types.Ranges
{
	/// <summary>
	/// Range of characters
	/// </summary>
	public class CharRange : Range<char>
	{
		public CharRange(char start = 'a', char end = 'z', int by = 1)
			: base(start, end)
		{
			By = by;
		}

		public int By { get; set; }

		public override char Next(char value)
		{
			return Convert.ToChar(Convert.ToInt32(value) + By);
		}
	}
}